package com.konne.nightmare.FastPublicOpinion.mvp.presenter;

import com.blankj.utilcode.util.ActivityUtils;
import com.konne.nightmare.FastPublicOpinion.base.BaseMvpPresenter;
import com.konne.nightmare.FastPublicOpinion.mvp.view.ICGMFreeView;
import com.konne.nightmare.FastPublicOpinion.mvp.view.ICGMSystemView;
import com.konne.nightmare.FastPublicOpinion.ui.dialog.EditGroupNameDialog;

import java.util.ArrayList;
import java.util.List;

/**
 * Create by ws.
 * on Data:2022/1/25  Time:下午 5:08.
 * description: ** .
 */
public class CGMSystemPersenter extends BaseMvpPresenter<ICGMSystemView> {
    public void init(){
        List<String > groups=new ArrayList<>();
        groups.add("第1组");
        groups.add("第2组");
        groups.add("第3组");
        groups.add("第4组");
        getView().updataGroup(groups);
    }
    public void addGroup() {
        new EditGroupNameDialog(ActivityUtils.getTopActivity(),1).setEditGroupNameListener(new EditGroupNameDialog.EditGroupNameListener() {
            @Override
            public void groupName(String txt) {
                getView().addGroup(txt);
            }
        }).show();
    }

    public void renameGroupName() {
        new EditGroupNameDialog(ActivityUtils.getTopActivity()).setEditGroupNameListener(new EditGroupNameDialog.EditGroupNameListener() {
            @Override
            public void groupName(String txt) {

            }
        }).show();
    }

    public void delGroup() {
    }
}
